﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DerievedClass_Delegates
{
    class Program
    {
        static void Main(string[] args)
        {
            Manager manager = new Manager("Pedro", "Pinto", 22, Genders.Male, "9701-2888", "Edificio Séculos");
            Console.WriteLine(manager.ToString());
            Console.ReadKey();
        }
    }

    public enum Genders { Male, Female };

    class Person
    {
        public string firstName;
        public string lastName;
        public int age;
        public Genders gender;

        public Person(string firstName, string lastName, int age, Genders gender)
        {
            this.firstName = firstName;
            this.lastName = lastName;
            this.age = age;
            this.gender = gender;
        }

        public override string ToString()
        {
            return firstName + " " + lastName + " (gender " + gender + "), age " + age;
        }

    }

    class Manager : Person
    {
        public string phoneNumber;
        public string officeLocation;

        public Manager(string firstName, string lastName, int age, Genders gender, string phoneNumber, string officeLocation)
            : base(firstName, lastName, age, gender)
        {
            this.phoneNumber = phoneNumber;
            this.officeLocation = officeLocation;
        }

        public override string ToString()
        {
            return base.ToString() + ", " + phoneNumber + ", " + officeLocation;
        }
    }
}
